package com.wang.animalkingdom;

import java.util.Scanner;

public class AnimalKingdomTest {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        Method.load(CacheData.animals);
        System.out.println("是否要进行数据修改：按0进行修改操作，其他任意数字退出");
        int choice = sc.nextInt();
        if (choice == 0){
            try {
                Method.modify(CacheData.animals,sc);
            } catch (Exception e){
                e.printStackTrace();
            } finally {
                Method.load(CacheData.animals);
            }
        }
    }
}
